{% extends "base.html" %}

{% block stylesheets %}
{% endblock %}

{% block content %}
<div class="jumbotron">
	<div class="container">
		<h1><b>{{ 'Reset Password' if en else '重置密码' }}</b></h1>
	</div>
</div>
<div class="container">
	<div class="row">
		<div class="col-md-6 offset-md-3">
			{% include "components/errors.html" %}

			{% if mode == "set" %}
				{% with form = Forms.auth.ResetPasswordForm() %}
				<form method="post" accept-charset="utf-8" autocomplete="off" role="form" class="form-horizontal">
					<div class="row">
						<div class="col-md-12">
                            <p>{{ 'You can now reset the password for your account and log in. Please enter in a new password below.' if en else '您现在可以重置帐户密码并登录。请在下面输入新密码。' }}</p>
						</div>
					</div>
					<div class="form-group">
                        {{ 'Password' if en else form.password.label }}
						{{ form.password(class="form-control") }}
					</div>
					<div class="row">
						<div class="col-md-6 offset-md-6">
                            {% if en %}
                            {{ form.submit(class="btn btn-md btn-primary float-right",value="Submit") }}
                            {% else %}
                            {{ form.submit(class="btn btn-md btn-primary float-right",value="提交") }}
                            {% endif %}
						</div>
					</div>
					{{ form.nonce() }}
				</form>
				{% endwith %}
			{% else %}
				{% with form = Forms.auth.ResetPasswordRequestForm() %}
				<form method="post" accept-charset="utf-8" autocomplete="off" role="form" class="form-horizontal">
					<div class="row">
						<div class="col-md-12">
							<p>{{ 'Please provide the email address associated with your account below.' if en else '请在下面填写与您的帐户关联的电子邮件地址。' }}</p>
						</div>
					</div>
					<div class="form-group">
                        {{ 'Email' if en else form.email.label }}
						{{ form.email(class="form-control") }}
					</div>
					<div class="row">
						<div class="col-md-6 offset-md-6">
                            {% if en %}
                            {{ form.submit(class="btn btn-md btn-primary float-right",value="Submit") }}
                            {% else %}
                            {{ form.submit(class="btn btn-md btn-primary float-right",value="提交") }}
                            {% endif %}
						</div>
					</div>
					{{ form.nonce() }}
				</form>
				{% endwith %}
			{% endif %}
		</div>
	</div>
</div>
{% endblock %}

{% block scripts %}
{% endblock %}
